#define _CRT_SECURE_NO_WARNINGS

#include <iostream>
using namespace std;

void Del_x(LinkList& L, ElemType x)
{
	if (L == NULL)
		return;
	LNode* p = L;
	while (p->next != NULL)
	{
		if (p->next->data != x)
			p = p->next;
		else
		{
			LNode* s = p->next;
			p->next = s->next;
			free(s);
		}
	}

}